mirror of
https://github.com/pgsty/minio.git
synced 2026-08-10 16:23:28 +03:00
f5b4b0765a
This updates dependency for - AWS S3 backend. - pkg/madmin ``` - Relax isValidBucketName to allow reading existing buckets. (#708) (3 minutes ago) <Harshavardhana> - For GCS the size limit of S3 is not useful. (#711) (3 days ago) <Harshavardhana> - s3utils: Support AWS S3 US GovCloud endpoint. (#701) (3 days ago) <Harshavardhana> - api: Always strip 80/443 port from host (#709) (3 days ago) <Anis Elleuch> - Redact signature strings properly. (#706) (4 days ago) <Harshavardhana> - api: Single putObject can use temporary file always. (#703) (6 days ago) <Harshavardhana> - Spelling fix (#704) (7 days ago) <Jacob Taylor> - api/encrypt: Get() on encrypted object should be a reader. (#699) (2 weeks ago) <Harshavardhana> - get: Fix reading an object if its size is unknown (#694) (3 weeks ago) <Anis Elleuch> - fixes #696 by updating the examples for put-encrypted-object and get-encrypted-object (#697) (3 weeks ago) <Tejay Cardon> - fix InvalidAccessKeyId error according to amazon documentation (#692) (4 weeks ago) <samkevich> - Add AWS S3 SSE-C example. (#689) (4 weeks ago) <Harshavardhana> - According to RFC7232 Etag should be in quotes for If-Match. (#688) (5 weeks ago) <Harshavardhana> - api: getReaderSize() should honor seeked file descriptors. (#681) (5 weeks ago) <Harshavardhana> - tests: Use bytes.Repeat() when generating big data (#683) (5 weeks ago) <Anis Elleuch> - api: Failed call retry with region only when http.StatusBadRequest. (#678) (5 weeks ago) <Harshavardhana> - api: Add NewWithCredentials() (#646) (5 weeks ago) <Harshavardhana> ```
54 lines
1.8 KiB
Go
54 lines
1.8 KiB
Go
/*
|
|
* Minio Go Library for Amazon S3 Compatible Cloud Storage (C) 2017 Minio, Inc.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
// Package encrypt implements a generic interface to encrypt any stream of data.
|
|
// currently this package implements two types of encryption
|
|
// - Symmetric encryption using AES.
|
|
// - Asymmetric encrytion using RSA.
|
|
package encrypt
|
|
|
|
import "io"
|
|
|
|
// Materials - provides generic interface to encrypt any stream of data.
|
|
type Materials interface {
|
|
|
|
// Closes the wrapped stream properly, initiated by the caller.
|
|
Close() error
|
|
|
|
// Returns encrypted/decrypted data, io.Reader compatible.
|
|
Read(b []byte) (int, error)
|
|
|
|
// Get randomly generated IV, base64 encoded.
|
|
GetIV() (iv string)
|
|
|
|
// Get content encrypting key (cek) in encrypted form, base64 encoded.
|
|
GetKey() (key string)
|
|
|
|
// Get user provided encryption material description in
|
|
// JSON (UTF8) format. This is not used, kept for future.
|
|
GetDesc() (desc string)
|
|
|
|
// Setup encrypt mode, further calls of Read() function
|
|
// will return the encrypted form of data streamed
|
|
// by the passed reader
|
|
SetupEncryptMode(stream io.Reader) error
|
|
|
|
// Setup decrypted mode, further calls of Read() function
|
|
// will return the decrypted form of data streamed
|
|
// by the passed reader
|
|
SetupDecryptMode(stream io.Reader, iv string, key string) error
|
|
}
|