Beispiel #1
0
        public CryptoStorage(IKeyDerivationFunction kdf, IEncryptor encryptor)
            : this()
        {
            kdf.ThrowIfNull(nameof(kdf));
            encryptor.ThrowIfNull(nameof(encryptor));

            this.kdf       = kdf;
            this.encryptor = encryptor;
        }
Beispiel #2
0
 internal static void Serialize(Stream destination, IKeyDerivationFunction obj)
 {
     destination.ThrowIfNull(nameof(destination));
     obj.ThrowIfNull(nameof(obj));
     GenericSerializer.Serialize(destination, obj, TypeToEnumMappings, FormatExceptionMessage);
 }