Install the nuget for .Net core project : https://www.nuget.org/packages/Portable.BouncyCastle/
Install the nuget for .Net core project : https://www.nuget.org/packages/BouncyCastle/1.8.9?_src=template
Install the nuget for .Net core project : https://www.nuget.org/packages/Portable.BouncyCastle/
Install the nuget for .Net core project : https://www.nuget.org/packages/BouncyCastle/1.8.9?_src=template
Go to Picture Account => workspace => Setting => APPS AND FEATURES => OAuth consumers => Add Customer. https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/#Create-a-consumer
$ curl -X POST -u "client_id:secret" \
https://bitbucket.org/site/oauth2/access_token -d grant_type=password \
-d username={username} -d password={password}
public async Task<string> UploadFile(string filePath) | |
{ | |
_logger.LogInformation($"Uploading a text file [{filePath}]."); | |
if (string.IsNullOrWhiteSpace(filePath)) | |
{ | |
throw new ArgumentNullException(nameof(filePath)); | |
} | |
if (!File.Exists(filePath)) | |
{ |
#!/bin/bash | |
# Functions ============================================== | |
# return 1 if global command line program installed, else 0 | |
# example | |
# echo "node: $(program_is_installed node)" | |
function program_is_installed { | |
# set to 1 initially | |
local return_=1 |
// Here you can find full description: https://thetial.com/rsa-encryption-and-decryption-net-core/ | |
using System; | |
using System.IO; | |
using System.Text; | |
using System.Collections.Generic; | |
using Org.BouncyCastle.Crypto; | |
using Org.BouncyCastle.Crypto.Encodings; | |
using Org.BouncyCastle.Crypto.Engines; | |
using Org.BouncyCastle.OpenSsl; |
public static class StringCipher | |
{ | |
public static string Encrypt(string toEncrypt, bool useHashing, string key = "my_token") | |
{ | |
byte[] keyArray; | |
byte[] toEncryptArray = UTF8Encoding.UTF8.GetBytes(toEncrypt); | |
System.Configuration.AppSettingsReader settingsReader = new AppSettingsReader(); | |
//System.Windows.Forms.MessageBox.Show(key); |