Ejemplo n.º 1
0
 public ProfileManager(IProfileSerializer serializer, IStorage storage, IOptions <ProfileManagerOptions> options, IAccessKeyProtector protector = null)
 {
     _serializer = serializer;
     _storage    = storage;
     _options    = options;
     _protector  = protector;
 }
Ejemplo n.º 2
0
        public static byte[] UnprotectKey(byte[] key, IAccessKeyProtector protector)
        {
            if (protector == null)
            {
                return(key);
            }

            return(protector.UnprotectKey(key));
        }
Ejemplo n.º 3
0
        public static byte[] ProtectKey(byte[] key, IAccessKeyProtector protector, bool clearKey = true)
        {
            if (protector == null)
            {
                return(key);
            }

            byte[] previous = key;
            key = protector.ProtectKey(key);

            if (clearKey)
            {
                Array.Clear(previous, 0, previous.Length);
            }

            return(key);
        }
Ejemplo n.º 4
0
 public SigningKeyBuilder(IOptions <S3Config> options, ILogger <SigningKeyBuilder> logger, IAccessKeyProtector protector = null)
 {
     _options   = options;
     _logger    = logger;
     _protector = protector;
 }