@@ -43,12 +43,12 @@ impl<Ids: KeyIds, Key: KeyId, T: CompositeEncryptable<Ids, Key, Output>, Output>
4343
4444/// An encryption operation that takes the input value - a primitive such as `String` and encrypts
4545/// it into the output value. The implementation decides the content format.
46- pub trait TypedEncryptable < Ids : KeyIds , Key : KeyId , Output > {
46+ pub trait PrimitiveEncryptableWithContentType < Ids : KeyIds , Key : KeyId , Output > {
4747 fn encrypt ( & self , ctx : & mut KeyStoreContext < Ids > , key : Key ) -> Result < Output , CryptoError > ;
4848}
4949
50- impl < Ids : KeyIds , Key : KeyId , T : TypedEncryptable < Ids , Key , Output > , Output >
51- TypedEncryptable < Ids , Key , Option < Output > > for Option < T >
50+ impl < Ids : KeyIds , Key : KeyId , T : PrimitiveEncryptableWithContentType < Ids , Key , Output > , Output >
51+ PrimitiveEncryptableWithContentType < Ids , Key , Option < Output > > for Option < T >
5252{
5353 fn encrypt (
5454 & self ,
@@ -61,7 +61,7 @@ impl<Ids: KeyIds, Key: KeyId, T: TypedEncryptable<Ids, Key, Output>, Output>
6161 }
6262}
6363
64- impl < Ids : KeyIds > TypedEncryptable < Ids , Ids :: Symmetric , EncString > for & str {
64+ impl < Ids : KeyIds > PrimitiveEncryptableWithContentType < Ids , Ids :: Symmetric , EncString > for & str {
6565 fn encrypt (
6666 & self ,
6767 ctx : & mut KeyStoreContext < Ids > ,
@@ -71,7 +71,7 @@ impl<Ids: KeyIds> TypedEncryptable<Ids, Ids::Symmetric, EncString> for &str {
7171 }
7272}
7373
74- impl < Ids : KeyIds > TypedEncryptable < Ids , Ids :: Symmetric , EncString > for String {
74+ impl < Ids : KeyIds > PrimitiveEncryptableWithContentType < Ids , Ids :: Symmetric , EncString > for String {
7575 fn encrypt (
7676 & self ,
7777 ctx : & mut KeyStoreContext < Ids > ,
@@ -148,7 +148,7 @@ impl<Ids: KeyIds, Key: KeyId, T: Encryptable<Ids, Key, Output>, Output>
148148mod tests {
149149 use crate :: {
150150 cose:: ContentFormat , traits:: tests:: * , AsymmetricCryptoKey , Decryptable , Encryptable ,
151- KeyStore , SymmetricCryptoKey , TypedEncryptable ,
151+ KeyStore , PrimitiveEncryptableWithContentType , SymmetricCryptoKey ,
152152 } ;
153153
154154 fn test_store ( ) -> KeyStore < TestIds > {
0 commit comments