CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of Static
C++
#include <utility>
 
// Note: I've revised my implementation of AUTO_FUN here
// to make its use look more like a function definition
 
#define AUTO_FUN_IMPL( ... ) decltype( __VA_ARGS__ ) { return __VA_ARGS__; }
 
#define AUTO_FUN( name_and_param_list ) auto name_and_param_list-> AUTO_FUN_IMPL
 
template< typename SourceType >
by Matt Calabrese   January 27, 2010 @ 9:55pm
477 Views
no comments
 
C#
using System;
using System.Security.Cryptography;
using System.Text;
using System.Web;
 
public static string HashedString(string cleanString, string salt)
{
    if (String.IsNullOrEmpty(cleanString)) { return String.Empty; }
 
    //Bytes to hash
by tomy ismail   July 15, 2009 @ 10:32pm
253 Views
no comments
 
C#
using System.Security.Cryptography;
using System.Text;
using System.Web;
 
public static string SHA256Encrypt(string source, int digitRandom)
{
    string outputHash = String.Empty;
 
    try
    {
by tomy ismail   July 15, 2009 @ 10:29pm
291 Views
no comments
 
C#
public static string RandomAlphaNumeric(int digits)
{
  Random random = new Random();
  byte[] buffer = new byte[digits / 2];
  random.NextBytes(buffer);
  string result = String.Concat(
  buffer.Select(x => x.ToString("X2")).ToArray());
  if (digits % 2 == 0)
  {
    return result;
by tomy ismail   July 15, 2009 @ 10:18pm
253 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate