[−][src]Trait lockbook_core::service::crypto_service::PubKeyCryptoService
Required methods
fn generate_key() -> Result<RSAPrivateKey, Error>
fn encrypt(
public_key: &RSAPublicKey,
decrypted: &DecryptedValue
) -> Result<EncryptedValue, Error>
public_key: &RSAPublicKey,
decrypted: &DecryptedValue
) -> Result<EncryptedValue, Error>
fn sign(
private_key: &RSAPrivateKey,
to_sign: String
) -> Result<SignedValue, Error>
private_key: &RSAPrivateKey,
to_sign: String
) -> Result<SignedValue, Error>
fn verify(
public_key: &RSAPublicKey,
signed_value: &SignedValue
) -> Result<(), SignatureVerificationFailed>
public_key: &RSAPublicKey,
signed_value: &SignedValue
) -> Result<(), SignatureVerificationFailed>
fn decrypt(
private_key: &RSAPrivateKey,
encrypted: &EncryptedValue
) -> Result<DecryptedValue, DecryptionFailed>
private_key: &RSAPrivateKey,
encrypted: &EncryptedValue
) -> Result<DecryptedValue, DecryptionFailed>
Implementors
impl PubKeyCryptoService for RsaImpl
[src]
fn generate_key() -> Result<RSAPrivateKey, Error>
[src]
fn encrypt(
public_key: &RSAPublicKey,
decrypted: &DecryptedValue
) -> Result<EncryptedValue, Error>
[src]
public_key: &RSAPublicKey,
decrypted: &DecryptedValue
) -> Result<EncryptedValue, Error>
fn sign(
private_key: &RSAPrivateKey,
to_sign: String
) -> Result<SignedValue, Error>
[src]
private_key: &RSAPrivateKey,
to_sign: String
) -> Result<SignedValue, Error>
fn verify(
public_key: &RSAPublicKey,
signed_value: &SignedValue
) -> Result<(), SignatureVerificationFailed>
[src]
public_key: &RSAPublicKey,
signed_value: &SignedValue
) -> Result<(), SignatureVerificationFailed>
fn decrypt(
private_key: &RSAPrivateKey,
encrypted: &EncryptedValue
) -> Result<DecryptedValue, DecryptionFailed>
[src]
private_key: &RSAPrivateKey,
encrypted: &EncryptedValue
) -> Result<DecryptedValue, DecryptionFailed>