diff options
| author | 2018-08-04 14:33:11 -0400 | |
|---|---|---|
| committer | 2018-08-04 14:33:11 -0400 | |
| commit | 2b06301dbfbfe79687219bf7783a6d1b47695401 (patch) | |
| tree | 222cc27ecbc7f7e86d2edef8d36436600dee7d7a /src/core/crypto/encryption_layer.cpp | |
| parent | Merge pull request #919 from lioncash/sign (diff) | |
| parent | Add missing parameter to files.push_back() (diff) | |
| download | yuzu-2b06301dbfbfe79687219bf7783a6d1b47695401.tar.gz yuzu-2b06301dbfbfe79687219bf7783a6d1b47695401.tar.xz yuzu-2b06301dbfbfe79687219bf7783a6d1b47695401.zip | |
Merge pull request #849 from DarkLordZach/xci
XCI and Encrypted NCA Support
Diffstat (limited to 'src/core/crypto/encryption_layer.cpp')
| -rw-r--r-- | src/core/crypto/encryption_layer.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/core/crypto/encryption_layer.cpp b/src/core/crypto/encryption_layer.cpp new file mode 100644 index 000000000..4204527e3 --- /dev/null +++ b/src/core/crypto/encryption_layer.cpp | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "core/crypto/encryption_layer.h" | ||
| 6 | |||
| 7 | namespace Core::Crypto { | ||
| 8 | |||
| 9 | EncryptionLayer::EncryptionLayer(FileSys::VirtualFile base_) : base(std::move(base_)) {} | ||
| 10 | |||
| 11 | std::string EncryptionLayer::GetName() const { | ||
| 12 | return base->GetName(); | ||
| 13 | } | ||
| 14 | |||
| 15 | size_t EncryptionLayer::GetSize() const { | ||
| 16 | return base->GetSize(); | ||
| 17 | } | ||
| 18 | |||
| 19 | bool EncryptionLayer::Resize(size_t new_size) { | ||
| 20 | return false; | ||
| 21 | } | ||
| 22 | |||
| 23 | std::shared_ptr<FileSys::VfsDirectory> EncryptionLayer::GetContainingDirectory() const { | ||
| 24 | return base->GetContainingDirectory(); | ||
| 25 | } | ||
| 26 | |||
| 27 | bool EncryptionLayer::IsWritable() const { | ||
| 28 | return false; | ||
| 29 | } | ||
| 30 | |||
| 31 | bool EncryptionLayer::IsReadable() const { | ||
| 32 | return true; | ||
| 33 | } | ||
| 34 | |||
| 35 | size_t EncryptionLayer::Write(const u8* data, size_t length, size_t offset) { | ||
| 36 | return 0; | ||
| 37 | } | ||
| 38 | |||
| 39 | bool EncryptionLayer::Rename(std::string_view name) { | ||
| 40 | return base->Rename(name); | ||
| 41 | } | ||
| 42 | } // namespace Core::Crypto | ||